package com.liyy.platform.other.mytest;

import java.io.*;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.ServerSocket;
import java.net.Socket;

import org.omg.CORBA.portable.InputStream;

public class TestUDPSeverSocket
	{
		public static void main(String [] args) throws IOException{
		byte buf[]=new byte[1024];
		DatagramPacket dp=new DatagramPacket(buf,buf.length);
		DatagramSocket ds=new DatagramSocket(7777);
		while(true){
			ds.receive(dp);
			ByteArrayInputStream bis=new ByteArrayInputStream(buf);
			DataInputStream dis=new DataInputStream(bis);
			System.out.println(dis.readLong());
//			System.out.println(new String(buf,0,buf.length));
		}
	}
}